const config = require('../config');
const request = require('axios');

module.exports = async (cat, page = 1) => {
    let res = await request.get(
        config.catUrl,
        {
            params: {
                cat,
                page
            },
            headers:{
                'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36'
            },
            withCredentials:true
        });
    //console.log(res);
    return res;
};